Communication in a computer network involves the exchange of information between two or more entities interconnected by communication links and subnetworks. These entities are typically software programs executing on hardware computer platforms, such as end nodes and intermediate nodes. An intermediate node, such as a router, interconnects the communication links and subnetworks to enable transmission of information between the end nodes. The nodes typically communicate by exchanging discrete packets or messages of information according to predefined protocols. In this context, a protocol consists of a set of rules defining how the nodes interact with each other.
A router is an intelligent intermediate node that comprises hardware elements, such as route and/or forwarding processors, memories, line cards and physical interfaces. A physical interface comprises the physical, electrical and mechanical interchange circuits, along with the software and data structures that allow the router to receive and transmit information over the network. The physical interface thus provides connectivity between users of the router and the network and, to that end, is a valuable resource to a purchaser of the router.
In addition to providing physical interfaces for a wide range of communication links and subnetworks, the router also implements network services, such as route processing, path determination and path switching functions. The route processing function allows the router to determine the type of routing needed for a packet, whereas the path switching function allows a router to accept a packet on one physical interface and forward it on a second interface. The path determination, or forwarding decision, function enables the router to select the most appropriate interface for forwarding a packet.
The router generally provides its network services through the execution of software modules, such as processes. A process is a software program that is defined by a memory address space. For example, an operating system of the router may be implemented as a single process with a large memory address space, wherein pieces of code within the process provide operating system services, such as process management. Yet, the router's network services may also be implemented as separately-scheduled processes in distinct, protected address spaces. These separate processes, each with its own process address space, execute on the router to manage resources internal to the router and, in the case of a database or routing protocol, to interact with users.
Services that are part of the same process address space communicate by accessing the same memory space. That is, information exchanged between services implemented in the same process address space is not transferred, but rather may be accessed in a common memory. However, communication among services that are implemented as separate processes is typically effected by the exchange of messages. For example, information exchanged between different addresses spaces of processes is transferred as one or messages between different memory spaces of the processes. A known message-passing mechanism provided by an operating system to transfer information between process address spaces is the Inter Process Communication (IPC) mechanism.
An application programming interface (API) is a set of software calls and routines that are made available (exported) by a process and that can be referenced by other processes. The services provided by the process are typically embodied as APIs. For example, services of a database process, such as lookup operations, queries and insertions, are provided via APIs that enable other processes to perform those operations.
Resources internal to the router may include communication resources that enable a process on one “physical” router to communicate over the network with another process on a different physical router. As used herein, a physical router comprises the hardware elements and software modules described above. The communication resources include the allocation of memory and data structures, such as packets, as well as a network protocol stack and physical interfaces of each router. The network protocol stack, in turn, comprises layers of software, such as a transport layer, an internetwork layer and a media (driver) layer. The Internet protocol (IP) is an internetwork layer protocol that provides network addressing between nodes, such as routers, whereas the transport layer provides a port service that identifies each process executing on the routers and creates a connection between those processes that indicate a willingness to communicate.
Transport layer services may be embodied as a socket interface comprising a client socket library (contained within each process) and a socket server of the network protocol stack. A process accesses the network protocol stack via the socket interface by creating a process message data structure that is passed to the socket server. The process message is typically embodied as information (data) “payload” appended to a transport header, the type of which depends on the transport layer protocol used by the process. Examples of conventional transport layer protocols include the Transmission Control Protocol (TCP), User Datagram Protocol (UDP) and Raw IP. The TCP transport service provides reliable delivery of a packet using a TCP transport header prepended to the packet, while the UDP service provides best efforts delivery using a UDP header. Raw IP denotes a process that does not use the transport provided by the socket interface, but directly interfaces to the IP layer of the network protocol stack.
Broadly stated, physical routers utilize communication resources, such as their network protocol stacks and physical interfaces, to enable communication among their processes by connecting those processes externally over the network. For example to establish communication with a receiving process on a destination router, a sending process executing on a source router constructs a process message using its socket library and passes it to the socket server (or transport layer) of the network protocol stack. The process message includes, inter alia, a destination network address of the destination router and a destination port number of the receiving process. The sending process passes that information as a connection request to its socket library to initialize a socket (i.e., open a virtual connection). The communication resources of the source and destination physical routers then establish communication between the processes.
To that end, the socket server also includes a library that is used to create a network layer (e.g., IP) header having, inter alia, source and destination network (IP) addresses. The socket server prepends the IP header to the transport header and passes that “packet” structure to the IP layer, which constructs a media access (MAC) header. The IP layer performs a lookup operation into a global forwarding information base (FIB) to determine an outgoing physical interface of the physical router. The global FIB includes a forwarding table that contains forwarding information, such as mappings of layer 3 (L3) network addresses to layer 2 (L2) MAC addresses and outgoing interfaces. Upon obtaining the proper outgoing interface, the IP layer prepends the MAC header to the packet and passes it to the media layer, which sends the packet over the network to the destination router.
At the destination router, each layer of the network protocol stack receiving the packet “unwinds” its respective header. For example, the headers prepended to the packet are stripped off, one-by-one, as the packet propagates up the layers of the network protocol stack until it arrives at the socket server of the stack. The socket server processes the packet to determine the port number of the receiving process and passes a process message to the client socket library internal to that process. The client socket then converts the process message into information that the receiving process understands. Thus, the communication resources of the physical routers cooperate to build a complete communication path that extends from the sending process, down the network protocol stack, through the physical interface of the source router and over the computer network to the physical interface of the destination router, up the network stack and to the receiving process.
A virtual router (VR) provides all of the services and functions of a physical router via software emulation. Typically, the physical router can support one or more VRs and, as such, each VR should appear as a separate physical router in the computer network, providing its services through the execution of processes. However, a VR is not a separate physical router; it shares both hardware and software resources of the physical router. Examples of resources shared (and assigned) among the VRs include physical interfaces that allow each VR to communicate with other routers. Virtual routers and their implementations are well-known and described in a white paper titled, Virtual Routing for Provider Edge Applications, IP Infusion Inc., San Jose, Calif. (2002), which paper is hereby incorporated by reference.
As noted, a sending process executing on a physical router may communicate externally over the computer network with a receiving process executing on another physical router using the communication resources of the routers. Similarly, a sending process executing on a VR of a source router may communicate externally with a receiving process executing on another VR of a destination router using the communication resources of each physical router. Moreover, processes of two separate VRs executing on the same physical router can communicate by coupling a physical wire (an external connection) to the physical interfaces assigned to each VR. Within the physical router, the communication resources described above are used to enable communication between the VR processes.
However, connecting the VR processes via an external connection is an expensive solution in that it consumes two physical interfaces of the physical router. If a physical router supports (implements) more than two VRs, additional physical interfaces may be consumed to enable communication among those VRs. Moreover, each external connection utilizes additional communication resources (memory, packets, network protocol stack) of the router. Accordingly, connectivity in a physical router configured to implement VRs is problematic; i.e., valuable communication resources (e.g., physical interfaces, etc.) may be consumed by the VRs, resulting in diminished connectivity (and saleability) of the physical router. The invention is directed to reducing the communication resources consumed by VRs implemented on a physical router to thereby increase connectivity of the router.